﻿using System.Data;

namespace Agile.Infra.Core.Agile
{
    /// <summary> Sheet </summary>
    public class SheetModel
    {
        /// <summary> Sheet名称 </summary>
        public string SheetName { get; set; }

        /// <summary> 要插入图片的列名称 </summary>
        public string ImageCellName { get; set; }

        /// <summary> 表格列参数 </summary>
        public List<TableParams> TableParamsList { get; set; }

        /// <summary> 表格列参数 </summary>
        public int StartRowNum { get; set; }

        /// <summary> Sheet里的数据 </summary>
        public DataTable Data { get; set; }

        public List<RowModel> RowData { get; set; }

    }

    public class RowModel
    {
        public RowModel()
        {
        }
        public RowModel(int rowNum, CellModel cellData)
        {
            RowNum = rowNum;
            CellData = new List<CellModel> { cellData };
        }
        public RowModel(int rowNum, List<CellModel> cellData)
        {
            RowNum = rowNum;
            CellData = cellData;
        }

        public int RowNum { get; set; }

        public List<CellModel> CellData { get; set; }

    }

    public class CellModel
    {
        public CellModel()
        {
        }
        public CellModel(int column, string content)
        {
            Column = column;
            Content = content;
        }
        public int Column { get; set; }
        public string Content { get; set; }
        public int firstRow { get; set; }
        public int lastRow { get; set; }
        public int firstCol { get; set; }
        public int lastCol { get; set; }
    }

}
